Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 3 - Text Encoding Converter Reference / Text Encoding Converter Functions
Identifying Direct Encoding Conversions /


TECCountDirectTextEncodingConversions

Counts and returns the number of direct conversions that the Text Encoding Converter supports in its current configuration.

pascal OSStatus TECCountDirectTextEncodingConversions (
                     ItemCount *numberOfEncodings);
numberOfEncodings
A pointer to a value of type ItemCount. On output, this value indicates the number of direct conversions that the converter is currently configured to support.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than noErr, then one of the text conversion plug-ins encountered an error when polled by the Text Encoding Converter.
DISCUSSION
You use the number that TECCountDirectTextEncodingConversions returns to determine how large to make the array you pass to the function TECGetDirectTextEncodingConversions (page 72).

TECCountDirectTextEncodingConversions counts each instance of an available conversion. That is, if different conversion plug-ins support the same direct conversion, this function includes each instance of the direct conversion in its sum. Consequently, the same direct conversion may be counted more than once. Because the TECGetDirectTextEncodingConversions (page 72) function does not return duplicate direct conversions, TECCountDirectTextEncodingConversions may return a number greater than the number of array elements required.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997